#ifndef KWDB_SDK_STATUS_H
#define KWDB_SDK_STATUS_H

#include <string>

namespace kwdb {

/**
 * @brief Status code and message for SDK operations
 *
 * code = 0 means OK
 * code < 0 means transport/gRPC errors
 * code > 0 means server-side errors
 */
struct Status {
    int code;
    std::string message;

    Status() : code(0), message("OK") {}
    Status(int c, const std::string& msg) : code(c), message(msg) {}

    bool ok() const { return code == 0; }
    bool is_transport_error() const { return code < 0; }
    bool is_server_error() const { return code > 0; }
};

} // namespace kwdb

#endif // KWDB_SDK_STATUS_H